Skip to content

Conversation

@HuyPhanNguyen
Copy link
Contributor

@HuyPhanNguyen HuyPhanNguyen commented Aug 7, 2025

Background

Current octopus worker view and octopus worker-pool view command don't support -f param.

Result

At support -f json , -f table, -f basic
sc-116437

octopus worker view

Before

Always return

PS D:\Octopus\cli\bin> octopus worker view "Test-Worker" -f json
Name              Test-Worker (Workers-1)
Health status     Unavailable
Current status    There was a problem communicating with this machine (last checked: Thursday, 07 August 2025 3:33:14 PM +10:00)
Worker Pools      Default Worker Pool
URI               https://test-worker.example.com:10933/
Tentacle version  0.0.0
Proxy             None

After

  • json
PS D:\Octopus\cli\bin> .\octopus.exe worker view "Test-Worker" -f json
{
  "Id": "Workers-1",
  "Name": "Test-Worker",
  "HealthStatus": "Unavailable",
  "StatusSummary": "There was a problem communicating with this machine (last checked: Thursday, 07 August 2025 3:33:14 PM +10:00)",
  "CommunicationStyle": "TentaclePassive",
  "WorkerPools": [
    "Default Worker Pool"
  ],
  "EndpointDetails": {
    "Tentacle version": "0.0.0",
    "URI": "https://test-worker.example.com:10933/"
  },
  "WebUrl": "http://localhost:8066/app#/Spaces-1/infrastructure/workers/Workers-1/settings"
}
  • table
PS D:\Octopus\cli\bin> .\octopus.exe worker view "Test-Worker" -f table
NAME         TYPE                HEALTH       STATUS                                                                                                          WORKER POOLS         ENDPOINT DETAILS
Test-Worker  Listening Tentacle  Unavailable  There was a problem communicating with this machine (last checked: Thursday, 07 August 2025 3:33:14 PM +10:00)  Default Worker Pool  URI: https://test-worker.example.com:10933/; Tentacle version: 0.0.0

octopus worker-pool view

Before

PS D:\Octopus\cli\bin> octopus worker-pool view "Default Worker Pool" -f json
Name                        Default Worker Pool (WorkerPools-1)
Worker Pool Type            Static
Default                     Yes
Total workers               4
Disabled workers            0
Healthy workers             1
Has Warnings workers        0
Unhealthy workers           0
Unavailable workers         3
SSH workers                 1
Listening Tentacle workers  2
Polling Tentacle workers    1

After

  • json
PS D:\Octopus\cli\bin> .\octopus.exe worker-pool view "Default Worker Pool" -f json
{
  "Id": "WorkerPools-1",
  "Name": "Default Worker Pool",
  "WorkerPoolType": "StaticWorkerPool",
  "IsDefault": true,
  "Workers": {
    "Total": 4,
    "Healthy": 1,
    "HasWarnings": 0,
    "Unhealthy": 0,
    "Unavailable": 3,
    "Disabled": 0,
    "SSH": 1,
    "ListeningTentacle": 2,
    "PollingTentacle": 1
  },
  "WebUrl": "http://localhost:8066/app#/Spaces-1/infrastructure/workerpools/WorkerPools-1"
}
  • table
PS D:\Octopus\cli\bin> .\octopus.exe worker-pool view "Default Worker Pool" -f table
NAME                 TYPE              DEFAULT  WORKERS  HEALTHY  UNHEALTHY
Default Worker Pool  StaticWorkerPool  Yes      4        1        3

@HuyPhanNguyen HuyPhanNguyen marked this pull request as ready for review August 7, 2025 08:03
@HuyPhanNguyen HuyPhanNguyen changed the title Worker view support json format feat: worker view and work-pool view support -f parameter Aug 7, 2025
@HuyPhanNguyen HuyPhanNguyen merged commit 4446ba6 into main Sep 8, 2025
4 of 5 checks passed
@HuyPhanNguyen HuyPhanNguyen deleted the huy/sc-116437-worker-view-support-json-format branch September 8, 2025 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants